//
//  UIKeyboardViewController.h
//
//
//  Created by  YFengchen on 13-1-4.
//  Copyright 2013 __zhongyan__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "UIKeyboardView.h"

@protocol UIKeyboardViewControllerDelegate;

@interface UIKeyboardViewController : NSObject <UITextFieldDelegate, UIKeyboardViewDelegate, UITextViewDelegate> {
	CGRect keyboardBounds;
	UIKeyboardView *keyboardToolbar;
    UIView *objectView;
    UIView *VCView;
}
@property (nonatomic, assign) id <UIKeyboardViewControllerDelegate> boardDelegate;
@property (nonatomic )CGFloat tabbarHeight;

- (void)resignKeyboard:(UIView *)resignView;

@end

@interface UIKeyboardViewController (UIKeyboardViewControllerCreation)

- (id)initWithControllerDelegate:(id <UIKeyboardViewControllerDelegate>)delegateObject;

@end

@interface UIKeyboardViewController (UIKeyboardViewControllerAction)

- (void)addToolbarToKeyboard;

-(void)addTextFildOrTextViewDelegate;

-(void) updateViewFrameY:(CGFloat) y ;

@end

@protocol UIKeyboardViewControllerDelegate <NSObject>

@optional

- (void)alttextFieldDidEndEditing:(UITextField *)textField;
- (void)alttextViewDidEndEditing:(UITextView *)textView;

- (void)alttextViewWillBeginEditing:(UITextView *)textField;
- (void)alttextFieldDidBeginEditing:(UITextField *)textField;
- (void)alttextViewDidBeginEditing:(UITextView *)textView;

- (BOOL) textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text;
- (BOOL) textField:(UITextField *)textField shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text;
- (void)textViewDidChange:(UITextView *)textView;

/** 键盘出现或者消失，调用此回调
 *
 */
- (void) keyboarDidshow:(BOOL )isShow keyboardHeight:(CGFloat) keyboardHeight spaceY:(CGFloat) spaceY ;

@end
